<template>
	<view v-if="hasDescription" class="card description">
		<view class="card-title">产品介绍</view>
		<view class="parse-wrap">
			<up-parse :content="description" @ready="onReady"></up-parse>
		</view>
	</view>
</template>

<script setup lang="ts">
interface DescriptionProps {
	description: string
}
import { computed } from "vue"

const props = defineProps<DescriptionProps>()
const emit = defineEmits(["resource-loaded"])

const hasDescription = computed(() => !!props.description)

const onReady = () => emit("resource-loaded")
</script>

<style lang="scss" scoped>
@import "../ticket/index.scss";

.description {
	.parse-wrap {
		position: relative;
	}
}
</style>
